
<template>
<div  @touchmove.prevent @mousewheel.prevent>
   <div class="login">
   </div>
    <fieldset class="border1">
     <legend style="height:85px; margin-left: -190px; color:gray">会员登录login</legend>
  <div style="width:500px;background:#fafafa;border:1px solid #eee;box-shadow:3px 3px #F5F5F5 " align="center">
<el-form :model="ruleForm" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
  <el-form-item label="用户名:" prop="user" style="margin-top:50px">
    <el-input type="text" v-model="ruleForm.user" autocomplete="off" style="width:350px"></el-input>
  </el-form-item>
  <el-form-item label="密码:" prop="password">
    <el-input type="password" v-model="ruleForm.password" autocomplete="off" style="width:350px"></el-input>
  </el-form-item>
  <el-form-item label="验证码:" prop="check">
    <el-input v-model.number="ruleForm.check" style="width:100px; margin-left:-250px"></el-input>
  </el-form-item>
  <el-form-item>
    <!--登录页面进行跳转到首页用整体。href链接跳转-->
   <router-link to="/MainApp"> <el-button type="primary" @click="submitForm('ruleForm')">登录</el-button></router-link>&nbsp;<a href="https://www.baidu.com/" id="a1">忘记密码?</a>
  </el-form-item>
<el-form-item> 
  <p style="color:grey; margin-top: 20px;">还不是会员? <router-link to="/zhuCe" id="a2"> 马上注册成为会员</router-link></p>
  </el-form-item>
</el-form>
  </div>
    </fieldset>
</div>
</template>
<script>
   
  export default {
    
    data() {
      
      var validateuser = (rule, value, callback) => {
        if (value === '') {
          callback(new Error('请输入用户'));
        } else {
          if (this.ruleForm.user !== '') {
            this.$refs.ruleForm.validateField('user');
          }
          callback();
        }
      };
       var validateassword = (rule, value, callback) => {
        if (value === '') {
          callback(new Error('请输入密码'));
        } else {
          if (this.ruleForm.password !== '') {
            this.$refs.ruleForm.validateField('password');
          }
          callback();
        }
      };
    
      return {
        ruleForm: {
          user: '',
          password: '',
          check: '',
        },
       
        rules: {
          user: [
            { validator: validateuser, trigger: 'blur' }
          ],
         
          password: [
            { validator: validateassword, trigger: 'blur' }
          ]
        }
      };
    },
    methods: {
      submitForm(formName) {
       
      },
    }
  }
</script>
<style >
.login
  {
    height: 383px;
    width: 383px;
    background-image: url("@/assets/images/login.png");
    margin-top: 30px;
    margin-left: 200px;
  }
.border1{

  width:500px;
 height: 200px;
margin-top: -450px;
 margin-left: 700px;
 border: 0ch;

}
#lable1{
  font-size:15px ;
  color: gray;
}
#a2{
  color: coral;
}
#a2:hover{
  text-decoration: underline;
  color: red;
}
#a1{
   font-size: 12px;
   color:grey;
   margin-left: 20px;
   
}
#a1:hover{
  text-decoration: underline;
  color: red;
 
}

</style>







